<%=render 'layouts/header'%>

<div class="container app new">
  <%=render 'comoms/alert'%>
  <%=form_for @app, :html => { class: "app_form" } do |f|%>
    <div class="title"><span>
    <% if @app.persisted? %>
      修改应用
    <% else %>
      新建应用
    <% end %>
    </span></div>
      <div class="form-group">
        <label for="app_name">应用名称*：</label>
        <%= f.text_field :name, class:"form-control", required:true %>
      </div>

      <% if @app.persisted? %>
      <div class="form-group">
        <label for="app_archive">归档：</label>
        <%= f.check_box :archived %>
        </div>
      <% end %>
      
    <%=f.submit @app.persisted? ? "保存" : "新建", class:"btn btn-primary ui-plat"%>
  <%end%>
</div>
